﻿CREATE TABLE [dbo].[MotivoAtraso] (
    [MotivoAtrasoId]   INT       IDENTITY (1, 1) NOT NULL,
    [DescMotivoAtraso] NTEXT     NULL,
    [MotivoMaoObra]    NCHAR (1) DEFAULT ('N') NOT NULL,
    [MotivoRetrabalho] NCHAR (1) DEFAULT ('N') NOT NULL,
    [MaterialId]       INT       NOT NULL,
    PRIMARY KEY CLUSTERED ([MotivoAtrasoId] ASC),
    CONSTRAINT [FK_MotivoAtraso_Material] FOREIGN KEY ([MaterialId]) REFERENCES [dbo].[Material] ([MaterialId])
);

